package com.zjzywl.smoke.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zjzywl.smoke.repository.OrganizationRepository;
import com.zjzywl.smoke.entity.Organization;

@Controller
public class MainController {
	@Autowired
	private OrganizationRepository repository;

	@RequestMapping(value = "/manage")
	public List<Organization> main(Model model) {
		List<Organization> orgList = repository.findAll();
		return orgList;
	}

}
